Method and system for capturing images of a liquid sample

ABSTRACT

A method and system for capturing images of a liquid sample flowing through a field of view of an imaging device that can include stepping a focus mechanism of the imaging device through a plurality of focus values and capturing a plurality of images of the sample at each of the plurality of focus values as the sample flows through the field of view of the imaging device. In this way, image capture can proceed before a focus value has been determined and capture images that are in focus can be used for further processing subsequently.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation application of U.S. patentapplication Ser. No. 15/532,091, filed May 31, 2017 which is a NationalPhase entry of PCT Application No. PCT/EP2017/058097, filed Apr. 5,2017, which claims priority from Great Britain Application No. 1605897.6filed Apr. 6, 2016 and which claims priority from Portugal ApplicationNo. 109297, filed Apr. 6, 2016, the disclosures of which are all herebyincorporated by referenced herein in their entirety.

TECHNICAL FIELD

The present invention relates to a method and system for capturingimages of a liquid sample during flow.

BACKGROUND

Some methods of analyzing a liquid sample involve capturing images ofthe sample whilst the sample is flowing. Characteristics of the samplecan then be determined based on the captured images. In order toaccurately determine these characteristics, it is desirable to focus theimaging device on the sample and, in particular, where appropriate, thecomponent of the sample which is of interest. For example, if the sampleis a blood sample, it may be desirable to focus the imaging device onblood cells or platelets in particular.

One approach to obtaining images of the sample which are in focus is tocarry out a focusing algorithm in order to focus the imaging device onthe sample once the sample has started flowing. However, this typicallytakes dozens of seconds or even minutes.

SUMMARY

Aspects of the disclosure are set out in the independent claims.Further, additional features are set out in the dependent claims.

In some aspects, there is provided a method of capturing images of aliquid sample flowing through a field of view of an imaging device. Themethod comprises stepping a focus mechanism of the imaging devicethrough a plurality of focus values and capturing a plurality of imagesof the sample at each of the plurality of focus values as the sampleflows through the field of view of the imaging device.

Advantageously, the method reduces or even eliminates the time spent onfocusing an imaging device on the liquid sample during flow beforeimages are captured in order to increase the amount of time availablefor image capture. Specifically, by capturing a plurality of images ateach of a plurality of focus values, a set of images of the liquidsample over time is obtained at multiple focus values. In other words, adata set (i.e. a set of images over time) is obtained for each of theplurality of focus values. The images in which the liquid sample is infocus can then be selected and used to carry out analysis on the liquidsample. Capturing multiple sets of images, each at a different focusvalue, thus avoids the need for a preliminary step of finding a suitablefocus value for the image capture device before data collection begins.Instead, image capture can begin as soon as the liquid sample begins toflow.

In some embodiments, stepping the focus mechanism through the pluralityof focus values comprises repeatedly varying the focus value between aminimum value and a maximum value. Advantageously, this means thatimages captured at a given focus value are spread out over time morethan they would be if the focus value would be increased stepwise, witha first set of images taken at a first focus value, then a second set ofimages at a second focus value and so on. During this longer timeperiod, a greater volume of liquid flows through the field of view ofthe imaging device and as a result, a greater number of objects (e.g.blood cells or platelets) are imaged at a given focus value. Conversely,in the step-wise method, images taken at a given focus value areclustered together in time and span a smaller volume of liquid and hencefewer objects are imaged at a given focus value.

In some embodiments, stepping the focus mechanism through the pluralityof focus values comprises varying the focus value periodically.

In some embodiments, consecutive images are captured at different focusvalues. In other words, each image is captured at a focus value which isdifferent to that at which the previous image was captured.

In some embodiments, a focus measure is determined for each of some orall of the captured images. A focus measure may refer to a value of anyquantity which is indicative of whether, and optionally to what extent,a given image is in focus. In some embodiments, the focus measure is acontrast-based focus measure. For example, a Sobel operator may be usedto derive the focus measure by convoluting the operator with capturedpixels. See for example, “An Isotropic 3×3 Image Gradient Operator” byIrwin Sobel published Feb. 2, 2014 and available online atresearchgate.net. For example, focus measures may be calculated byconvoluting the operator with image patch or patches around segmentedobjects. In some embodiments, the operator is applied to the wholeimage. Other operators may also be used to calculate the focus measure,as is well known in the art.

In some embodiments, a velocity of one or more objects in an image maybe determined and a focus measure for the image determined based on thevelocities.

In some embodiments, determining a focus measure may include identifyingand counting objects within each image and determining a focus measurefor each image based on the number and/or type and/or size of objectsidentified in that image. For example, objects may be platelets in ablood sample. Determining a focus measure in this way is based on theidea that, generally, the most objects being counted will be found inthe images which are most in focus. Taking the example of countingplatelets, images may be captured for the purpose of determining aplatelet count. Once the images have been captured, an algorithm is usedto identify and count the platelets in each image. For the images inwhich the platelets appear but are out of focus, the platelets may notbe identified and counted as platelets by the algorithm. On the otherhand, platelets in the in-focus images would be identified and countedby the algorithm as platelets. In this way, the number of objects ofinterest which are identified in each image may be indicative ofwhether, and optionally to what extent, that image is in focus.

In some embodiments, a subset of images for further processing isidentified. Further processing may involve saving the images, sendingthem to a different processor for analysis, or carrying out analysis onthe images, for example to determine a characteristic of the sample. Inthe event that the sample is a blood sample, such a characteristic maybe a blood cell count or a platelet count.

In some embodiments, further processing the images may include measuringone or more of the size, shape or colour of objects in the images. Insome embodiments, it may include characterising the behaviour of objectsin the images, such as aggregation of objects (e.g. blood cells orplatelets), a change in shape of the objects and/or the position ofobjects in the flow channel.

In some embodiments, a subset of images for further processing isidentified based on the focus measures of the captured images.

In some embodiments, the subset of images for further processing may beidentified directly based on the focus measures of the images. Forexample, a focus acceptability criterion may be evaluated on the focusmeasure of each image and those images which have a focus measure whichsatisfies the criterion identified for further processing. In someembodiments, identifying a subset of the captured images includesapplying a threshold to the determined focus measures. In someembodiments, identifying a subset of images for further processingincludes determining a range of focus measures and identifying forfurther processing those images which have a focus measure fallingwithin the range. In some embodiments, identifying a subset includesordering the focus measures and including in the subset those imageswhich have a focus measure in a top range of values, for example the top5%, 10% or 20% etc. of focus measures.

In some embodiments, a subset of images may be identified for furtherprocessing based on the mean focus measure, the median focus measure,the standard deviation of the focus measures (e.g. across all capturedimages, or images taken at a particular focus value) or any otherquantity.

In some embodiments, the subset of images for further processing may beidentified based on the focus measures of the images indirectly, forexample via the focus value at which each image was taken. For example,in some embodiments, identifying a subset of images for furtherprocessing includes selecting one or more focus values based on thedetermined focus measures and identifying for further processing imageswhich were taken at the selected focus value(s). In some embodiments,the average focus measure across images taken at each focus value may bedetermined and one or more focus values selected based on the averagefocus measures. In some embodiments, the average focus measure may be anextremum or a local extremum.

In some embodiments, identifying a subset of images for analysisinvolves selecting a focus value for which the corresponding averagefocus measure is a local extremum and the corresponding average objectvelocity is larger than object velocities at any other local extrema ofthe determined focus measures. Methods of determining object velocitiesare described in application number PCT/EP2015/072416, which isincorporated by reference herein in its entirety.

In some embodiments, once images have been identified for furtherprocessing, they may be marked or flagged as belonging to the subset forfurther processing. Alternatively or additionally, those images whichare not identified for further processing may be deleted.

In some embodiments, images are captured online, while the sample flows,and the captured images are processed offline, once all of the sample tobe imaged has been imaged. In particular, in some embodiments, the stepsof determining a focus measure for each image and identifying a subsetof the images for further processing may be carried out offline, onceall of the sample to be imaged has been imaged. In some embodiments, thecaptured images are processed once the whole liquid sample has flowedthrough the flow channel.

In some embodiments, the method may comprise determining a first focusvalue based on the determined focus measures, setting the focusmechanism of the imaging device according to the first focus value andcapturing further images at the first focus value. In this way, imagecapture can begin as soon as the liquid sample starts to flow, with aplurality of images at each of a plurality of focus values beingcaptured. These images can then be processed and a focus value selectedbased on these images (for example based on focus measures determinedfor the images). The focusing mechanism can then be set according to theselected focus value and further images captured at the selected focusvalue. In other words, there may be a first stage in which a pluralityof images are captured at each of the plurality of focus values and afocus measure determined for each image. A focus value is thendetermined based on the determined focus measures and the focusmechanism of the imaging device set according to the determined focusvalue. One or more further images are then captured at the focus value.In some embodiments, the rest of the images may be captured at thedetermined focus value. In other words, further images may be capturedat the focus value without changing the focus value.

In some embodiments, the method may comprise identifying for furtherprocessing the images which were captured at the selected focus value.In some embodiments, this may include the images captured at the focusvalue during the first stage (during which a plurality of images at eachof a plurality of focus values were captured). The images capturedduring the first stage of image capture (during which a plurality ofimages at each of a plurality of focus values were captured) are used toselect a focus value and also form part of the set of images on whichanalysis of the liquid sample is carried out. Advantageously, in thisway, useful data is acquired whilst a suitable focus value isidentified.

In embodiments in which the method comprises determining focus measuresof captured images, the method may further comprise setting a secondplurality of focus values based on the determined focus measures and/orthe focus value selected based on the determined focus measures. Themethod may further comprise stepping the focus mechanism of the imagingdevice through the second plurality of focus values and capturing aplurality of images of the sample at each of the second plurality offocus values as the sample flows through a field of view of the imagingdevice. In this way, the focus values at which images are captured canbe updated based on analysis carried out on previously captured images.For example, a range of focus values at which images are captured may beshifted over time as the images taken previously are processed and theresulting data used to optimise the focus values at which later imagesare captured.

In some embodiments there is provided a method of:

-   -   a. stepping the focus mechanism of the imaging device through a        plurality of focus values    -   b. capturing a plurality of images of the sample at each of the        plurality of focus values as the sample flows through the field        of view of the imaging device    -   c. determining a focus measure for each of the images captured        at each of the plurality of focus values;    -   d. identifying a focus value based on the determined focus        measures    -   e. setting the focusing mechanism of the imaging device to the        focus value    -   f. capturing further images at the focus value and    -   g. repeating steps (a) to (e)

The method may comprise alternating phases of (1) varying the focusvalue and capturing images and (2) keeping the focus value constant andcapturing images. In this way, a check may be carried out periodically(by varying the focus value, capturing images and analysing the images)in order to check that images are being captured at a suitable focusvalue. If they are not, then the focus value of the focus mechanism maybe changed.

In some embodiments, the method may comprise identifying for furtherprocessing the images captured at the focus value identified initially(i.e. the first time step d is carried out) and/or the focus valueidentified at the first check (i.e. the second time step d is carriedout).

In some embodiments, the method further comprises setting the pluralityof focus values at which images are captured such that images of theliquid sample are captured across the depth of a channel in which theliquid sample flows. In other words, the plurality of focus values areset such that the set of focal planes at which images are captured spansthe depth of the channel.

In some embodiments, the channel in which the liquid sample flows may beprovided on a disc or cartridge, for example a microfluidic disc, whichis disposed relative to the imaging device. In some embodiments, thedisc or cartridge may be fixedly disposed relative to the imaging devicein a direction perpendicular to the focal plane of the imaging device.In some embodiments, the disc or cartridge may be free to rotate in aplane parallel to the focal plane of the imaging device. Flow of thesample through the channel may be driven by a variety of drivingmechanisms, including capillary forces, centrifugal forces,electrophoretic forces and any other suitable driving mechanisms.

In some embodiments, the channel and the imaging device may be part ofthe same apparatus as the imaging device.

In some embodiments, the method may comprise determining the depth ofthe channel through which the liquid sample flows. In some embodiments,the depth of the channel may be associated with a cartridge or disc(e.g. a microfluidic disc) on which the channel is provided.Alternatively, the depth of the channel may be stored in a memory of thedevice in which the imaging device is provided.

In some embodiments, once a subset of images for further processing hasbeen identified, the method comprises carrying out the furtherprocessing of the images in the subset. As mentioned above, furtherprocessing may include saving the images in a certain location orsending them elsewhere (e.g. to a processor) for analysis. In someembodiments, further processing the images may comprise determining acharacteristic of the liquid sample based on the images in the sample.For example, further processing the images may include identifying andcounting objects, for example cells, within each image. Such methods ofimage analysis are described in more detail in application numberPCT/EP2015/072392, which is incorporated herein by reference in itsentirety. In some embodiments, further processing the images may includemeasuring one or more of the size, shape or colour of objects in theimages. In some embodiments, it may include characterising the behaviourof objects in the images, such as aggregation of objects (e.g. bloodcells or platelets), a change in shape of the objects and/or theposition of objects in the flow channel.

In some embodiments, the method may comprise determining an object countbased on the images identified for further processing.

In some embodiments, a further subset of the subset of images identifiedfor further processing is selected based on the number of in-focusimages required in order to determine an accurate object count. Forexample, in some embodiments, 100 images may be required to obtain anaccurate object count result and as such, 100 images out of the subsetoriginally identified for further processing are selected.Advantageously, by selecting a further subset of the subset of imagesidentified for further processing, the chances of a given objectappearing in more than one image can be reduced or even eliminated. Thisreduces the chances of a given object being counted more than once (byvirtue of it appearing in more than one image).

In some embodiments, the further subset of images may be selected suchthat they are evenly spaced in time across the time period spanned bythe subset of images identified for further processing.

In some embodiments, once the further subset of the subset of imagesidentified for further processing have been selected, objects in thesubset of subset of images are then identified. This may be done, forexample, using standard techniques known in the art.

In some embodiments, the method may comprise determining whether any ofthe objects in the images remained stationary for a period of timeduring which images were captured (thus appearing in the same positionin multiple images). This may be done, for example, by comparing two ormore images and identifying any objects which appear in the same orsimilar position in more than one of the two or more images.Advantageously, this step may aid in avoiding counting any objects whichare stuck in the field of view (i.e. are not flowing along the flowchannel). This may improve the accuracy of an object count determinedbased on these images.

In some embodiments, the method may further comprise the steps of:

(i) determining the total number of objects in the further subset of thesubset of images identified for further processing;

(ii) determining the total volume of liquid appearing in the furthersubset of the subset of images identified for further processing; and

(iii) determining an object count based on the total number of objectsin the further subset of the subset of images identified for furtherprocessing and the total volume of liquid appearing in the subset of thesubset of images identified for further processing.

In some embodiments, step (i) may comprise adjusting the total number ofobjects in the further subset of the subset of images identified forfurther processing based on the number of objects having been identifiedas having remained stationary for a period of time during which imageswere captured.

In some aspects, there is provided a system for analysing a liquidsample flowing through a field of view of an imaging device. The systemcomprises an imaging device for imaging a liquid sample flowing througha field of view of the imaging device, wherein the imaging device has afocus mechanism for positioning at least a portion of the imaging devicein accordance with a focus value. The system further comprises aprocessor configured to step a focus mechanism of the imaging devicethrough a plurality of focus values and capture a plurality of images ofthe sample at each of the plurality of focus values as the sample flowsthrough a field of view of the imaging device.

In some embodiments, the system may comprise a sample holder configuredto receive a cartridge comprising a flow channel, the sample holderbeing configured to hold the cartridge relative to the imaging device.For example, the cartridge may be a disc, for example a microfluidicdisc, and the holder may be a tray or slot similar to those found in DVDplayers.

In some embodiments, the processor may be configured to implement any ofthe methods as described herein or as set out in the claims.

In some embodiments, there is provided one or more tangible computerreadable media configured to implement the method steps of any of themethod claims or as described herein.

In some embodiments there is provided a computer program productcomprising coded instructions which, when run on a processor, implementa method as claimed in any of the method claims or as described herein.

The above summary is not intended to describe each illustratedembodiment or every implementation of the subject matter hereof. Thefigures and the detailed description that follow more particularlyexemplify various embodiments.

BRIEF DESCRIPTION OF THE DRAWINGS

Subject matter hereof may be more completely understood in considerationof the following detailed description of various embodiments inconnection with the accompanying figures, in which:

FIG. 1 is a schematic illustration of an imaging device for imaging aflowing sample;

FIG. 2 is a schematic diagram of a method of acquiring and processingimages of a flowing liquid sample; and

FIGS. 3-5 are schematic plots of focus values at which images are takenagainst time.

While various embodiments are amenable to various modifications andalternative forms, specifics thereof have been shown by way of examplein the drawings and will be described in detail. It should beunderstood, however, that the intention is not to limit the claimedinventions to the particular embodiments described. On the contrary, theintention is to cover all modifications, equivalents, and alternativesfalling within the spirit and scope of the subject matter as defined bythe claims.

DETAILED DESCRIPTION OF THE DRAWINGS

With reference to FIG. 1, an imaging device 2 comprises an objective(lens) assembly 4 for forming an image of a field of view 5 inside theimaging device 2. A focusing mechanism 6 is coupled to the objectiveassembly 4 to move the objective assembly along an optical axis in orderto focus at a given depth inside the field of view. A focus value is avalue indicative of where the imaging device 2 is focused. In someembodiments, the focus value is chosen to be a position along theoptical axis of the objective assembly 4 relative to the imaging device2. In some embodiments, the focus value is chosen to be a distance of animaged plane in focus from the imaging device 2 or a value related tothe configuration of the focus mechanism (e.g. rotor position of a focusdrive motor) or any other value indicative of where the imaging deviceis focused.

A processor 8 is coupled to the imaging device 2 and receives images andother signals for processing from the imaging device 2. In turn, theprocessor sends control information to the imaging device 2, includingcontrol information to set a focus value and cause the focus mechanism 6to position (or configure) the objective assembly 4 in accordance withthe focus value, as well as to, in some embodiments, control one or moreother parameters of the imaging device, for example the imaging gain ofan image sensor inside the imaging device 2. In this embodiment, theimaging device 2 and processor 8 are housed in a single unit. In someembodiments, components of the processor 8 and imaging device 2 may beprovided on a single integrated circuit. It will be understood that insome embodiments, the imaging device 2 and processor 8 may be providedas separate units.

A sample conduit 10 carries a flowing sample 12 containing objects 14.In this embodiment, the sample is a blood sample and the objects areblood cells, for example white blood cells. The objects may, in someembodiments, be platelets. The sample conduit 10 is disposed within thefield of view 5, so that the sample 12 and objects 14 can be imaged bythe imaging device, for example capturing a time series of frames at agiven sample rate. The sample conduit 10 is disposed relative to theimaging device 2 in a manner not illustrated in FIG. 1 for clarity. Thesample conduit 10 is provided on a microfluidic analysis cartridge whichcan be inserted into a holder associated with the imaging device 2 todispose the sample conduit 10 relative to the imaging device 2. In someembodiments, the sample conduit 10 and imaging device 2 may form part ofa single device.

The sample conduit 10 is provided on a disk cartridge implementing a labon a disk device and the imaging device and processor are part of a DVDreader like reader device including a mechanism for loading the lab on adisk device. Flow of the sample is driven by capillary forces. In someembodiments, flow of the sample may be driven by a variety of drivingmechanisms, including centrifugal forces, electrophoretic forces and anyother suitable driving mechanisms.

With reference to FIGS. 2 and 3, a method of capturing and processingimages of a liquid sample during flow is described.

With reference to FIG. 2, at step 16, a plurality of focus values aredetermined. These are set based on characteristics of the flow channeland/or the imaging device. In some embodiments, the plurality of focusvalues are set such that the corresponding focal planes are evenlyspaced across the full depth of the channel through which, in use, theliquid sample flows. In some embodiments, the plurality of focus valuesis set based on the hardware used and/or how fast the focus mechanism ofthe imaging device can be stepped through focus values. In someembodiments, the plurality of focus values is set based on an estimateof the minimum number of in-focus images needed to obtain an accuratecell count and/or the sensitivity of cell-counting algorithms used tothe degree to which an image is in focus.

Alternatively, in some embodiments, step 16 may be omitted from themethod and instead, pre-determined focus values may be used. In someembodiments, the plurality of focus values may be pre-determinedexperimentally, as will be described below.

At step 18, the processor causes the focus mechanism to step through theplurality of focus values and the imaging device to capture images whilethe focusing mechanism is stepped through the plurality of focusingvalues. A schematic diagram of a plot of focus value against time isshown in FIG. 3. Each point represents an image captured. As shown, theplurality of focus values comprises a starting focus value 26 and anumber of other focus values 28, 30, 32 and 34 falling within a range36. Typically, the range is on the scale of micrometers, e.g. 200-300micrometers.

The processor sets the focus mechanism of the imaging device to thestarting focus value 26 and causes the imaging device to capture animage. The processor then steps the focus mechanism to the next focusvalue 28, as shown in FIG. 3, and captures another images. This processis repeated, stepping the focus mechanism through the focus values andcapturing an image at each focus value. In some embodiments, the timebetween each captured image is between 5 and 20 milliseconds. The rateat which images are captured may, in some embodiments, be limited by theframe rate of the imaging device (i.e. the number of images the imagingdevice can capture per time interval). In some embodiments, the rate atwhich images are captured may be limited by the speed at which the focusmechanism can be stepped through the focus values. In some embodiments,the focus mechanism may comprise a stepper motor which is used to varythe focus value. The rate at which images are captured may, in someembodiments, be limited by the characteristics, e.g. the speed, of thestepper motor.

In stepping through the plurality of focus values, the processorrepeatedly varies the focus value between a minimum value 34 and amaximum value 30 in a periodic, oscillatory fashion, as illustrated inFIG. 3.

In some embodiments, the shape of the plot of focus value as a functionof time may equally take any other shape. For example, it may take theform of a sawtooth, a sinusoid, or a step function. For the latteroption, the method may comprise taking a plurality of images at a firstfocus value, then a second focus value, then a third focus value and soon, with the focus value increasing (or decreasing) over time.

In some embodiments, images are captured continuously (i.e. as often asthe imaging device will allow) whilst the focus mechanism is variedbetween the minimum focus value 34 and the maximum focus value 30, forexample in the way shown in FIG. 3.

At step 20, referring to FIG. 2, a focus measure is determined for eachof the captured images. In some embodiments, a focus measure may bedetermined for only some of the captured images. For example, a focusmeasure may be determined for each image in the first one (or two orthree) cycles over the set of focus values. Any suitable technique, asknown in the art, may be used to determine a focus measure. Thefollowing methods are provided by way of example.

In some embodiments, a Sobel operator may be used to determine a focusmeasure for captured images. This may be suitable where the imagesinclude objects with a high contrast (relative to the image background).This technique may be used on images of white blood cells, for example,but may also be used in counting platelets or other objects. As a firststep, each image is segmented into objects and background. An imagepatch is defined around each segmented object and a Sobel operator isconvoluted with each image patch. The results of these convolutions areaveraged over image patches to calculate the focus measure for thatimage.

In a specific implementation, the following Sobel operator and magnitudecalculation is used to derive an average gradient magnitude as a focusmeasure for each image patch:

If each image patch is denoted by A, and Gx and Gy define two imagespatches which at each point contain the horizontal and verticalderivative approximations, the computations are as follows:

$G_{x} = {{\begin{bmatrix}{- 1} & 0 & {+ 1} \\{- 2} & 0 & {+ 2} \\{- 1} & 0 & {+ 1}\end{bmatrix}*A\mspace{14mu}{and}\mspace{14mu} G_{y}} = {\begin{bmatrix}{+ 1} & {+ 2} & {+ 1} \\0 & 0 & 0 \\{- 1} & {- 2} & {- 1}\end{bmatrix}*A}}$

where * denotes a 2-dimensional convolution operation.

At each pixel in the image, the resulting gradient approximations can becombined to give the gradient magnitude as the square root of the sum ofthe squares of Gx and Gy at the pixel, or the sum of the absolute valuesas an approximation. This quantity is then averaged or summed over theimage patch pixels to give the focus measure.

The focus measure for the image patches within an image are thenaveraged in order to determine a single focus measure for that image.

In some embodiments, template matching techniques (as are known in theart) may be used to determine a focus measure for each image. Suchtechniques are described athttps://en.wikipedia.org/wiki/Template_matching, for example. Templatematching techniques may be suitable for images in which the contrastbetween the objects and the image background is relatively low. In someembodiments, template matching techniques may be used where the objectsare platelets, for example where the images are captured for the purposeof determining a platelet count.

As a first step, an initial template is determined. The initial templateis set based on what an in-focus object would look like in a capturedimage. This may be, for example, a circle with diameter equal to theaverage size of a platelet. This template is then applied to the imagesand a number of objects are identified. A similarly score for eachobject (i.e. a score based on the similarity of each object to thetemplate) is determined and a threshold is applied to the similarityscores to determine those objects which are most similar to the initialtemplate. The template is then adjusted based on the shape of theselected objects and the process repeated.

This process can be repeated a number of times, each time adjusting thetemplate to fit the objects in the image, to obtain a final template foran in-focus object. This template is then applied to the images toidentify the in-focus objects within each image. A focus measure foreach image is then determined based on the number of in-focus images ineach image. In particular, the more in-focus objects there are in animage, the better the focus measure for that image.

In some embodiments, other techniques may be used to determine a focusmeasure for each image, as is known in the art. In particular, in someembodiments, a measure of contrast between cells and the imagebackground may be determined as part of determining a focus measure foran image.

At step 22, a subset of images for further processing is identifiedbased on the focus measures determined at step 20. An ensemble measureof the focus measures is determined across images captured at each focusvalue, for example an average focus measure or a median focus measure,and the focus value with the best corresponding ensemble measure isselected. The images which were taken at the selected focus value areidentified for further processing. In some embodiments, the averagefocus measure may be an extremum or a local extremum.

In some embodiments, identifying a subset of images for analysisinvolves selecting a focus value for which the corresponding averagefocus measure is a local extremum and the corresponding average objectvelocity is larger than object velocities at any other local extrema ofthe determined focus measures. Methods of determining object velocitiesare described in application number PCT/EP2015/072416, which isincorporated by reference herein in its entirety.

As mentioned above, in some embodiments, images taken at different focusvalues may be included in the subset of images identified for furtherprocessing. This may be useful, for example, where there are differentgroups of objects within a channel. For example, it may be desirable toobtain in-focus images of cells flowing along the channel at a depthhalfway down the channel and also in-focus images of cells on the bottomof the channel.

In some embodiments, a subset of images for further processing isidentified based on the focus measures of the captured images in otherways.

In some embodiments, images for further processing may be identifiedbased directly on the focus measures of the images. For example, acriterion may be applied to the focus measure of each image and theimages which have a focus measure which meets the criterion are includedin the subset, i.e. are identified for further processing. In someembodiments, identifying a subset of the captured images includesapplying a threshold to the determined focus measures for the images.For example, any images which have a focus measure above a giventhreshold may be selected. In some embodiments, identifying a subset ofimages for further processing includes determining a range of focusmeasures and identifying for further processing those images which havea focus measure falling within the range. This may be the interquartilerange, for example, or may be a range between two pre-determined values.In some embodiments, identifying a subset includes placing the focusmeasures in numerical order and including in the subset those imageswhich have a focus measure in a range of values, for example the top 5%,10% or 20% etc. of focus measures.

In some embodiments, a subset of images may be identified for furtherprocessing based on the mean focus measure, the median focus measure,the standard deviation of the focus measures (e.g. across all capturedimages, or images taken at a particular focus value) or any otherquantity.

In some embodiments, images may be identified for further processingbased on the focus measures of the images indirectly. For example, oneor more focus values may be selected based on the focus measures ofimages captured at that focus value or values. The images captured atthat focus value or values may be identified for further processing.

As mentioned above, a focus measure may be identified for only some ofthe captured images. For example, a focus measure may be determined onlyfor each image in the first one (or two or three etc.) cycles over theset of focus values, using any of the methods described above or by anyother method. A focus value may then be selected based on the determinedfocus measures and each captured image which was taken when thefocussing mechanism was set according to the selected focus value isidentified for further processing. Objects may then be identified ineach image in the subset identified for further processing using anysuitable technique. For example, template matching techniques such asthose described above may be used to identify objects in the imagesidentified for further processing.

At step 24, the images of the subset are analysed. Analysing the imagesmay include identifying and counting objects (for example cells orplatelets) in the images.

In some embodiments, a platelet count is determined based on the subsetof images, as will now be described.

Of the subset of images identified for further processing (which maycomprise, in some embodiments, e.g. 5000 images), a subset of theseimages are selected based on the number of images required to provide anaccurate count. For example, 100 images may be required to obtain anaccurate platelet count result. Therefore, 100 images are selected fromthe subset identified for further processing. To avoid (or at leastreduce the chances of) double-counting the objects (e.g. platelets)(i.e. to avoid counting a given object more than once because it appearsin more than one image), the 100 images are selected such that they areevenly spaced (in time) across the subset identified for furtherprocessing. In this way, the chances of a given object being present inmore than one image is reduced (or even eliminated).

Once the subset of the subset of images (i.e. the 100 images, in thisexample) have been selected, objects in the subset of subset of imagesare then identified, for example using standard techniques known in theart. In some embodiments, as mentioned above, template matchingtechniques (in line with those described above) may be used to identifyobjects. In some embodiments, objects in the images may have alreadybeen identified as part of determining a focus measure for each image(as described) above.

A check may then carried out to identify any objects stuck in the fieldof view of the imaging device (i.e. objects stuck in place in the fieldof view, rather than flowing along the flow channel). In other words, acheck is carried out to identify any objects as having remainedstationary during a period of time during which images were captured.This check is carried out to avoid double-counting any objects stuck inthe field of view (or at least reduce the chances of double counting).For example, the images may be compared and any objects which appear inthe same position in multiple images may be identified as being stuckand taken into account in determining the final object count.

In some embodiments, the check may comprise summing a plurality ofimages, for example by stacking the plurality of images on top of oneanother. In other words, an image may be produced in which each pixelhas a brightness equal to the sum of the brightnesses of the pixels inthe corresponding position in the plurality of images. In this way, anyobjects which are in the same position in a plurality of images willshow up as an extremum (for example a local extremum or otherwise) inbrightness in the image.

Next, the total number of objects in the subset of the subset of images(i.e. the 100 images) are counted (taking into account any objects whichare stuck in the field of view). This total is then divided by the totalvolume of liquid appearing in the subset of the subset of images (i.e.the 100 images). The total volume of liquid can be calculated bymultiplying the number of images in the subset of the subset (100, inthis example) by the volume of liquid contained in the field of view ofthe imaging device. The volume of liquid contained in the field of viewof the imaging device can be determined based on the dimensions of thefield of view and optionally the dimensions of the flow channel.

For N images selected from the subset of images identified for furtherprocessing, an object count (such as a platelet count or a count of anyother objects in the image, for example white or red blood cells) may beidentified as follows:

$C = \frac{{Total}\mspace{14mu}{number}\mspace{14mu}{of}\mspace{14mu}{platelets}\mspace{14mu}{in}\mspace{14mu}{the}\mspace{14mu} N\mspace{14mu}{images}}{N\mspace{14mu} V_{FoV}}$

Where V_(FoV) is the volume contained in the field of view of the imagecapture device.

For the avoidance of doubt, although example figures of 5000 images inthe subset identified for further processing and 100 images selectedfrom that subset have been used above, the number of images capturedand/or used may equally be different, in some embodiments. Any referenceto ‘object’ made herein may refer to e.g. platelets, red blood cells orwhite blood cells.

In some embodiments, other methods may be used to count objects, forexample platelets or blood cells, as are known in the art. An example ofmethods directed to the identification and counting of cells are set outin application number PCT/EP2015/072392, which is incorporated herein byreference in its entirety.

In some embodiments, as described above, the plurality of focus valuesat which images are captured comprises a starting focus value and anumber of focus values falling within a range around the starting focusvalue. The starting focus value and the range may be determinedexperimentally, as will now be described.

Firstly, one or more calibration assays are carried out using one ormore calibration disks. A different calibration disk is used for eachassay and as part of each assay, a focussing algorithm is carried out inorder to determine a suitable (e.g. optimal) focus value for each assay.

Using multiple calibration disks may be advantageous for the followingreason. Due to imperfections in the manufacturing process used tomanufacture the disks, each disk (and in particular, the microfluidicstructures of each disk) may be slightly different. Further, thepositioning of the disk relative to the image capture device (and inparticular, the positioning of the flow channel relative to the imagecapture device) may be slightly different between disks. In embodimentsin which a plurality of assays are carried out using a plurality ofcalibration disks, by determining a suitable (e.g. optimal) focus valuefor a plurality of calibration disks, these differences andimperfections in the manufacturing process can be taken into account indetermining a starting focus value and a range of focus values, as willnow be described.

The starting focus value and the range are set based on the determinedfocus values for the assays. In some embodiments, the starting value isan average of the determined focus values over the assays and the rangeis set so as that the determined focus value for each assay falls withinthe range.

In some embodiments, additionally or alternatively, the values, numberand spacing (spacing in terms of focus value and/or in terms of time)may be determined based on other variables. Examples include the minimumnumber of images required to accurately determine the quantity to bedetermined (e.g. a blood cell count or platelet count), the range ofsuitable focus values determined for the calibration assays and thesensitivity of the degree to which images are in focus of the analysisalgorithms used (e.g. cell identification and counting algorithms).

In some embodiments, the starting focus value and the range may bedetermined based on the dimensions of the channel through which, in use,the liquid sample flows and/or characteristics of the imaging device.For example, in some embodiments, the starting focus value may be setsuch that the corresponding focal plane is at a depth halfway down thechannel and the range may be set so as to cover the full depth of thechannel.

With reference to FIG. 4, in some embodiments, the above-describedmethods of taking multiple images at multiple focus values may be usedto determine a focus value which is then used to take further images. Inother words, a method may comprise the following steps:

-   -   Capturing a plurality of images at each of a plurality of focus        values    -   Determining a focus measure for each image    -   Identifying a suitable focus value 38 based on the focus        measures    -   Setting the focusing mechanism of the imaging device to the        focus value 38    -   Capturing further images at the focus value 38    -   Identifying for further processing the images captured when the        focusing mechanism was set to the suitable focus value        (including the images taken before the suitable focus value was        determined)

A schematic diagram of possible focus values at which images are takenover time using the above described method is shown in FIG. 4. As shown,the method comprises an initial stage of image capture, between t_(a)and t_(b) in which images are captured at a plurality of focus values. Asuitable focus value 38 is then determined based on these images and thefocus mechanism is set to the suitable focus value. Further images arethen captured at the suitable focus value, between t_(b) and t_(c).

These two stages of image capture may be repeated. In other words, asmentioned above, the method may comprise alternating phases of (a)varying the focus value and capturing images and (b) keeping the focusvalue constant and capturing images. In this way, a check may be carriedout periodically (by varying the focus value, capturing images andanalysing the images) in order to check that images are being capturedat a suitable focus value. If they are not, then the focus value of thefocus mechanism may be changed accordingly.

With reference to FIG. 5, in some embodiments, the plurality of focusvalues at which images are captured may be updated over time based onanalysis of previously captured images. In some embodiments, a methodcomprises:

-   -   Setting a first plurality of focus values (40, 42, 44, 46 and        48)    -   Capturing images at the first plurality of focus values    -   Determining a focus measure for each image    -   Determining a suitable focus value 42 based on the focus        measures    -   Setting a second plurality of focus values (42, 44, 50, 40 and        46) based on the determined suitable focus value.

In some embodiments, once a focus value has been selected, the startingfocus value may be updated to the selecting focus value (i.e. from 40 to42). In this way, the range of focus values at which images are capturedmay be shifted over time as the images taken previously are processedand the resulting data used to optimise the focus values at which laterimages are captured.

In some embodiments, this process may be repeated, with the startingfocus value being updated periodically to optimise the focus values atwhich images are captured.

A schematic diagram of possible focus values at which images are takenover time using the above described method is shown in FIG. 5. As shown,the method comprises an initial stage of image capture, between t_(a)and t_(b) in which images are captured at a first plurality of focusvalues (40, 42, 44, 46 and 48). A suitable focus value 42 is thendetermined based on these images and the starting focus value is set tothe suitable focus value 42. Further images are then captured at asecond plurality of images falling in a range around the starting focusvalue, between t_(b) and t_(c).

As mentioned above, in some embodiments, the flow channel is provided ona cartridge or disc, such as a lab-on-a-chip device. Such a device maybe a microfluidic device. The cartridge or disc may have an inlet viawhich a liquid sample, e.g. a blood sample, is inserted, the channelbeing in fluidic communication with the channel. In some embodiments,the cartridge or disc is inserted into a holder associated with theimaging device in order to fixedly dispose the flow channel relative tothe imaging device.

Alternatively, in some embodiments, a flow channel and the imagingdevice may be provided as part of a single device.

In either case, in some embodiments, the depth of the flow channel in adirection perpendicular to the focal plane of the imaging device may besuch that it accommodates a single layer of objects which move acrossthe field of view of the imaging device.

It may be preferable to ensure that a single layer of objects moveacross the field of view of the image capture device to increase thechance that each object is imaged and optionally counted. It may also bepreferable in order to facilitate the classification of the objects, forexample as part of a cell classification process. If multiple layers ofobjects were provided in the field of view then some objects could beblocked from view completely and others could be partially obscured byother objects. Having a single layer of objects also facilitates anydefining characteristics of objects (including cells) being captured. Insome embodiments, the flow channel may be at least twice as wide as theestimated largest dimension of any object to be detected and its depthis less than twice this largest dimension. In some embodiments, the flowchannel is between 2 and 15 mm long, between 0.18 mm and 0.8 mm wide andbetween 0.02 and 0.03 mm deep. In one embodiment, the flow channel is 15mm long, 0.06 mm wide and 0.02 mm deep.

It will be appreciated that specific embodiments have been described byway of illustration only and that various modifications, alterations andjuxtapositions of the described features are possible without departingfrom the invention, as described above and otherwise. In particular, thesteps of the process described above with reference to FIG. 2 can tosome extent be changed in order and may be grouped and combined asappropriate.

Whilst FIGS. 3, 4 and 5 illustrate a method of varying the focus valuein a periodic fashion about a starting focus value, the shape of theplot of focus value as a function of time may equally take any othershape. For example, it may have the form of a sawtooth, a sinusoid, or astep function. For the latter option, the method may comprise taking aplurality of images at a first focus value, then a second focus value,then a third focus value and so on, with the focus value increasing (ordecreasing) over time).

It should be understood that references made herein to images being infocus or the imaging device focussing on the liquid sample are notnecessarily restricted to the images being precisely in focus or theimaging device being optimally focussed on the sample. What can beconsidered an acceptably focused image can change depending on theapplication, for example the exact assay being performed. For example,if cell shape is not critical, a non-optimally focused imaged mightyield results identical to an optimally focused one. Accordingly, focusvalues and images can be selected based on the criteria dictated by thekind of assay and any reference to an optimal or suitable focus valuemay be any focus value adhering to the particular requirements of agiven assay or process.

The various methods described above may be implemented by a computerprogram. The computer program product may include computer code arrangedto instruct a computer to perform the functions of one or more of thevarious methods described above. The computer program and/or the codefor performing such methods may be provided to an apparatus, such as acomputer, on one or more computer readable media or, more generally, acomputer program product. The computer readable media may be transitoryor non-transitory. The one or more computer readable media could be, forexample, an electronic, magnetic, optical, electromagnetic, infrared, orsemiconductor system, or a propagation medium for data transmission, forexample for downloading the code over the Internet. Alternatively, theone or more computer readable media could take the form of one or morephysical computer readable media such as semiconductor or solid statememory, magnetic tape, a removable computer diskette, a random accessmemory (RAM), a read-only memory (ROM), a rigid magnetic disc, and anoptical disk, such as a CD-ROM, CD-R/W or DVD.

Unless specifically stated otherwise, as apparent from the followingdiscussion, it is appreciated that throughout the description,discussions utilizing terms such as “receiving”, “determining”,“comparing”, “enabling”, “maintaining,” “identifying,” or the like, mayrefer to the actions and processes of a computer system, or similarelectronic computing device, that manipulates and transforms datarepresented as physical (electronic) quantities within the computersystem's registers and memories into other data similarly represented asphysical quantities within the computer system memories or registers orother such information storage, transmission or display devices.

Further, the described methods can be implemented using any suitablestand-alone or distributed computing environment using any suitablecomputing platform or processor, for example an integrated circuit,self-contained or in combination with other components of the system, adedicated computing device housed on an appropriate card together withthe other components of the system or otherwise, a standalone computingdevice such as a personal computer, tablet computer or mobile phone or aserver which performs the necessary processes at least in part remotelyexchanging data over a network connection.

It is to be understood that the above description is intended to beillustrative, and not restrictive. Many other implementations will beapparent to those of skill in the art upon reading and understanding theabove description. Although the present disclosure has been describedwith reference to specific example implementations, it will berecognized that the disclosure is not limited to the implementationsdescribed, but can be practiced with modification and alteration withinthe spirit and scope of the appended claims. Accordingly, thespecification and drawings are to be regarded in an illustrative senserather than a restrictive sense. The scope of the disclosure should,therefore, be determined with reference to the appended claims, alongwith the full scope of equivalents to which such claims are entitled.

Various embodiments of systems, devices, and methods have been describedherein. These embodiments are given only by way of example and are notintended to limit the scope of the claimed inventions. It should beappreciated, moreover, that the various features of the embodiments thathave been described may be combined in various ways to produce numerousadditional embodiments. Moreover, while various materials, dimensions,shapes, configurations and locations, etc. have been described for usewith disclosed embodiments, others besides those disclosed may beutilized without exceeding the scope of the claimed inventions.

Persons of ordinary skill in the relevant arts will recognize that thesubject matter hereof may comprise fewer features than illustrated inany individual embodiment described above. The embodiments describedherein are not meant to be an exhaustive presentation of the ways inwhich the various features of the subject matter hereof may be combined.Accordingly, the embodiments are not mutually exclusive combinations offeatures; rather, the various embodiments can comprise a combination ofdifferent individual features selected from different individualembodiments, as understood by persons of ordinary skill in the art.Moreover, elements described with respect to one embodiment can beimplemented in other embodiments even when not described in suchembodiments unless otherwise noted.

Although a dependent claim may refer in the claims to a specificcombination with one or more other claims, other embodiments can alsoinclude a combination of the dependent claim with the subject matter ofeach other dependent claim or a combination of one or more features withother dependent or independent claims. Such combinations are proposedherein unless it is stated that a specific combination is not intended.

Any incorporation by reference of documents above is limited such thatno subject matter is incorporated that is contrary to the explicitdisclosure herein. Any incorporation by reference of documents above isfurther limited such that no claims included in the documents areincorporated by reference herein. Any incorporation by reference ofdocuments above is yet further limited such that any definitionsprovided in the documents are not incorporated by reference hereinunless expressly included herein.

For purposes of interpreting the claims, it is expressly intended thatthe provisions of 35 U.S.C. § 112(f) are not to be invoked unless thespecific terms “means for” or “step for” are recited in a claim.

The invention claimed is:
 1. A method of capturing images of a liquidsample flowing through a channel on a microfluidic cartridge, whereinthe channel passes through a field of view of an imaging device, themethod comprising: retaining the microfluidic cartridge relative to theimaging device such that the channel is disposed relative to the fieldof view; stepping a focus mechanism of the imaging device through afirst plurality of focus values; capturing a plurality of images of thesample at each of the first plurality of focus values as the sampleflows through the channel passing through the field of view of theimaging device to obtain a set of images of the liquid sample over timefor each of the plurality of focus values; determining a focus measurefor each of the captured images; and identifying for further processinga subset of the captured images based on the determined focus measures.2. The method of claim 1 wherein stepping the focus mechanism throughthe first plurality of focus values comprises repeatedly varying thefocus value between a minimum value and a maximum value.
 3. The methodof claim 1, wherein identifying a subset of the captured imagescomprises evaluating a criterion on the focus measure for each capturedimage and identifying for further processing images with a focus measurewhich meets the criterion.
 4. The method of claim 1, comprising:identifying a first focus value based on the focus measures; setting thefocusing mechanism of the imaging device to the first focus value; andcapturing further images at the first focus value.
 5. The method ofclaim 4, comprising identifying for further processing images capturedwhen the focusing mechanism was set to the first focus value.
 6. Themethod of claim 4, comprising: (a) stepping the focus mechanism of theimaging device through a second plurality of focus values; (b) capturinga plurality of images of the sample at each of the second plurality offocus values as the sample flows through the field of view of theimaging device; (c) determining a focus measure for each of the imagescaptured at each of the second plurality of focus values; (d)identifying a second focus value based on the focus measures determinedin step (c); (e) setting the focusing mechanism of the imaging device tothe second focus value; and (f) capturing further images at the secondfocus value.
 7. The method of claim 6, comprising identifying forfurther processing images captured when the focusing mechanism was setto the second focus value.
 8. The method of claim 1, comprising:determining a focus value based on the determined focus measures;setting a second plurality of focus values based on the determined focusvalue; stepping the focus mechanism of the imaging device through thesecond plurality of focus values; and capturing a plurality of images ofthe sample at each of the second plurality of focus values as the sampleflows through a field of view of the imaging device.
 9. The method ofclaim 1, comprising further processing the images in the subset.
 10. Themethod of claim 9, wherein further processing the images comprisesdetermining a characteristic of the liquid sample or a component of theliquid sample based on the images in the subset.
 11. A system forcapturing images of a liquid sample, the system comprising: a flowchannel through which the liquid sample flows; an imaging deviceconfigured such that the liquid sample flows through a field of view ofthe imaging device; and a processor operably controlling the imagingdevice so as to implement a method as claimed in claim 1.